import { Column, Entity, JoinColumn, ManyToOne } from 'typeorm'
import { Role } from 'src/modules/role/entities/role.entity'
import { Staff } from 'src/modules/staff/entities/staff.entity'
import { App } from 'src/app.entity'
@Entity()
export class Admin extends App {
  @Column({ type: 'varchar', length: 5 })
  name: string
  @ManyToOne(() => Role)
  @JoinColumn({ name: 'role_id' })
  role: Role
  @ManyToOne(() => Staff)
  @JoinColumn({ name: 'staff_id' })
  staff: Staff
}
